﻿package com.tudou.home.controller
{
    import com.tudou.home.commands.*;
    import com.tudou.home.commands.ad.*;
    import com.tudou.home.model.*;
    import com.tudou.home.view.*;
    import org.puremvc.as3.interfaces.*;
    import org.puremvc.as3.patterns.command.*;

    public class TollVideoCommand extends SimpleCommand
    {

        public function TollVideoCommand()
        {
            return;
        }// end function

        override public function execute(param1:INotification) : void
        {
            var _loc_2:* = param1.getBody();
            var _loc_3:* = param1.getName();
            var _loc_4:* = facade.retrieveProxy(TollVideoProxy.NAME) as TollVideoProxy;
            var _loc_5:* = facade.retrieveMediator(TollVideoMediator.NAME) as TollVideoMediator;
            switch(_loc_3)
            {
                case TollVideoCommandSet.VERIFY:
                {
                    _loc_4.verify();
                    break;
                }
                case TollVideoCommandSet.VERIFY_SUCCEED:
                {
                    sendNotification(V2CommandSet.START_LOAD);
                    sendNotification(AdCommandSet.ADINFO_START_LOAD);
                    break;
                }
                case TollVideoCommandSet.VERIFY_FAILED:
                {
                    _loc_5.showTip(_loc_4.tollResult);
                    break;
                }
                default:
                {
                    break;
                    break;
                }
            }
            return;
        }// end function

    }
}
